#!/usr/bin/env python
"""
# -*- coding: utf-8 -*-
# @Time    : 2020/9/24 10:13
# @Author  : AshJo
# @Desc    : super方法
# @Filename: super.py
# @Version : v1.0
"""


# 在单继承的程序中，super就是找父类
class User:
    def __init__(self, name):
        self.name = name


class VIPUser(User):
    def __init__(self, name, level, start_date, end_date):
        super(VIPUser, self).__init__(name)  # 推荐写法
        self.level = level
        self.start_date = start_date
        self.end_date = end_date


s1 = VIPUser('小明', 5, '2020-09-24', '2021-09-24')
print(s1.__dict__)
